import Layout from '@/layout'

export const asyncRoutes = [
  // 工单管理
  {
    path: '/task',
    component: Layout,
    name: 'task',
    meta: { title: '工单管理', icon: 'icon-gongdanguanli' },
    children: [{
      path: 'business',
      name: 'business',
      component: () => import('@/views/Task/business'),
      meta: { title: '运营工单' }
    },
    {
      path: 'operation',
      name: 'operation',
      component: () => import('@/views/Task/operation'),
      meta: { title: '运维工单' }
    }]
  },
  // 点位管理
  {
    path: '/node',
    component: Layout,
    name: 'node',
    meta: { title: '点位管理', icon: 'icon-dingwei' },
    children: [{
      path: 'region',
      name: 'region',
      component: () => import('@/views/Node/region'),
      meta: { title: '区域管理' }
    },
    {
      path: 'node',
      name: 'node',
      component: () => import('@/views/Node/node'),
      meta: { title: '点位管理' }
    },
    {
      path: 'partner',
      name: 'partner',
      component: () => import('@/views/Node/partner'),
      meta: { title: '合作商管理' }
    }]
  },
  // 设备管理
  {
    path: '/vm',
    component: Layout,
    name: 'vm',
    meta: { title: '设备管理', icon: 'icon-shebei' },
    children: [{
      path: 'index',
      name: 'index',
      component: () => import('@/views/Vm/index'),
      meta: { title: '设备管理' }
    },
    {
      path: 'status',
      name: 'status',
      component: () => import('@/views/Vm/status'),
      meta: { title: '设备状态' }
    },
    {
      path: 'type',
      name: 'type',
      component: () => import('@/views/Vm/type'),
      meta: { title: '设备类型管理' }
    }]
  },
  // 人员管理
  {
    path: '/user',
    component: Layout,
    name: 'user',
    meta: { title: '人员管理', icon: 'icon-renyuanguanli' },
    children: [{
      path: 'index',
      name: 'index',
      component: () => import('@/views/User/index'),
      meta: { title: '人员列表' }
    },
    {
      path: 'user-task-stats',
      name: 'user-task-stats',
      component: () => import('@/views/User/user-task-stats'),
      meta: { title: '人效统计' }
    },
    {
      path: 'user-work',
      name: 'user-work',
      component: () => import('@/views/User/user-work'),
      meta: { title: '工作量列表' }
    }]
  },
  // 商品管理
  {
    path: '/sku',
    component: Layout,
    meta: { title: '商品管理', icon: 'icon-pintu' },
    name: 'sku',
    children: [{
      path: 'sku-class',
      name: 'sku-class',
      component: () => import('@/views/Sku/sku-class'),
      meta: { title: '商品类型' }
    },
    {
      path: 'sku',
      name: 'sku',
      component: () => import('@/views/Sku/sku'),
      meta: { title: '商品管理' }
    }]
  },
  // 策略管理
  {
    path: '/policy',
    component: Layout,
    // meta: { title: '策略管理', icon: 'icon-dengpao' },
    children: [{
      path: 'policy',
      name: 'policy',
      component: () => import('@/views/Policy/index'),
      meta: { title: '策略管理', icon: 'icon-dengpao' }
    }]
  },
  // 订单管理
  {
    path: '/order',
    component: Layout,
    // meta: { title: '订单管理', icon: 'icon-dingdan' },
    children: [{
      path: 'order',
      name: 'order',
      component: () => import('@/views/Order/index'),
      meta: { title: '订单管理', icon: 'icon-dingdan' }
    }]
  },
  // 对账统计
  {
    path: '/report',
    component: Layout,
    // meta: { title: '对账统计', icon: 'icon-duizhanggongdan' },
    children: [{
      path: 'report',
      name: 'report',
      component: () => import('@/views/Report/index'),
      meta: { title: '对账统计', icon: 'icon-duizhanggongdan' }
    }]
  }
]
